/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 头部样式 */
header {
    background-color: #4a6bff;
    color: white;
    padding: 25px 30px;
    text-align: center;
}

header h1 {
    margin-bottom: 10px;
    font-weight: 600;
}

/* 主要内容区域 */
main {
    padding: 30px;
}

/* 选项卡样式 */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 500;
    color: #777;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #4a6bff;
}

.tab-btn.active {
    color: #4a6bff;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #4a6bff;
    border-radius: 3px 3px 0 0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 控制按钮区域 */
.controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
}

.btn {
    background-color: #4a6bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(74, 107, 255, 0.25);
}

.btn:hover {
    background-color: #3a5ae8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 107, 255, 0.3);
}

.btn:disabled {
    background-color: #a0abdd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn i {
    font-size: 18px;
}

/* 语言选择器 */
.language-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.language-selector label {
    font-weight: 500;
}

.language-selector select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
    background-color: #f9f9f9;
    cursor: pointer;
}

/* 状态指示器 */
.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    gap: 15px;
}

#status {
    font-size: 16px;
    font-weight: 500;
    color: #555;
}

.recording-indicator {
    display: none;
    position: relative;
}

.recording-indicator.active {
    display: block;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: #ff4a4a;
    border-radius: 50%;
    display: inline-block;
}

.pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 74, 74, 0.6);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* 文件上传区域 */
.file-upload-container {
    width: 100%;
    margin-bottom: 25px;
}

.file-upload-area {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

.file-upload-area:hover, .file-upload-area.dragover {
    border-color: #4a6bff;
    background-color: rgba(74, 107, 255, 0.05);
}

.file-upload-area i {
    font-size: 48px;
    color: #4a6bff;
    margin-bottom: 15px;
}

.file-upload-area p {
    margin-bottom: 15px;
    color: #666;
}

.file-formats {
    font-size: 14px;
    color: #999;
    margin-top: 10px;
}

.file-upload-btn {
    background-color: #4a6bff;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(74, 107, 255, 0.25);
}

.file-upload-btn:hover {
    background-color: #3a5ae8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 107, 255, 0.3);
}

.file-info {
    margin-top: 20px;
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.file-info.hidden {
    display: none;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.file-details i {
    font-size: 24px;
    color: #4a6bff;
}

.file-details p {
    margin: 0;
}

.file-details p:first-child {
    font-weight: 500;
    color: #333;
}

.file-details p:last-child {
    font-size: 14px;
    color: #777;
}

.audio-player {
    width: 100%;
    margin: 15px 0;
}

.audio-player audio {
    width: 100%;
    border-radius: 8px;
}

.file-status {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    color: #555;
}

/* 转录结果区域 */
.transcript-container {
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.transcript-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.transcript-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.transcript-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background-color: transparent;
    border: none;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background-color: #eee;
    color: #4a6bff;
}

.transcript {
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    line-height: 1.6;
    font-size: 16px;
    color: #333;
    padding: 10px;
    border-radius: 8px;
    background-color: white;
    border: 1px solid #eee;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
    border-top: 1px solid #eee;
}

footer a {
    color: #4a6bff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background-color: #4a6bff;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

/* 加载动画 */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(74, 107, 255, 0.3);
    border-radius: 50%;
    border-top-color: #4a6bff;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        border-radius: 0;
        box-shadow: none;
    }
    
    header {
        padding: 20px;
    }
    
    main {
        padding: 20px;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .language-selector {
        margin-left: 0;
        justify-content: center;
    }

    .file-upload-area {
        padding: 25px 15px;
    }
} 